import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/views/Login'
import Home from '@/views/Home'
import Profile from '@/views/Profile'
import PHome from '@/views/ProjectHome'
import Issue from '@/views/IssueDetail'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: HelloWorld,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta: {
        requireAuth: false
      }
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/project/home',
      name: 'PHome',
      component: PHome,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/issue',
      name: 'Issue',
      component: Issue,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/profile',
      name: 'Profile',
      component: Profile,
      meta: {
        requireAuth: true
      }
    }
  ]
})
